package com.t213.smbms.controller;

import java.util.List;

import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.t213.smbms.entity.Role;
import com.t213.smbms.service.RoleService;

@Controller
@RequestMapping(value="/role")
public class RoleController {
	 
	private RoleService roleService;

	@Autowired
	public void setRoleService(RoleService roleService) {
		this.roleService = roleService;
	}
	
	@RequestMapping(params="opr=find")
	public String findRole(Model model) {
		List<Role> role=roleService.findRole();
		model.addAttribute("rolelist",role);
		return "jsp/useradd";
	}
}
